﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace WindowsGame1
{
    public class MainScreen 
    {
        public Vector2[] textVector =
        {
            new Vector2(200,0),
        };

        
        public MainScreen()
        {

        }

        ~MainScreen()
        {

        }
        public virtual void Draw(SpriteBatch spriteBatch, MouseState CurrentMouseState, Texture2D sprite, SpriteFont font,ref int menuPosition)
        {
            spriteBatch.Begin();
            spriteBatch.Draw(sprite, Vector2.Zero, Color.White);
            spriteBatch.DrawString(font, "Main Menu", Vector2.Zero, Color.White);
            spriteBatch.DrawString(font, "Inventory", textVector[0], Color.White);
            spriteBatch.End();

            if ((CurrentMouseState.X > 0 && CurrentMouseState.X < 170) &&
            (CurrentMouseState.Y > 0 && CurrentMouseState.Y < 40))
            {
                spriteBatch.Begin();
                spriteBatch.DrawString(font, "Main Menu", Vector2.Zero, Color.Yellow);
                spriteBatch.End();

                if (CurrentMouseState.LeftButton == ButtonState.Pressed)
                {
                    menuPosition = 0;
                }

            }
            
        }

        public void Aim(SpriteBatch spriteBatch, MouseState CurrentMouseState, Texture2D sprite, Enemy[] enemyTab)
        {
            for (int i = 0; i < enemyTab.Length; i++)
            {
                if ((CurrentMouseState.X > enemyTab[i].coord.X && CurrentMouseState.X < enemyTab[i].coord.X + 32) &&
               (CurrentMouseState.Y > enemyTab[i].coord.Y && CurrentMouseState.Y < enemyTab[i].coord.Y + 32))
                {
                    spriteBatch.Begin();
                    spriteBatch.Draw(sprite, new Vector2(CurrentMouseState.X - 16, CurrentMouseState.Y - 16), Color.White);
                    spriteBatch.End();
                }

            }
        }
        public void GameMode()
        {

        }

        public void GameWon()
        {

        }

        public void GameLost()
        {

        }

        public void GameAdvance()
        {

        }
     }
}
